import { Ref } from 'vue'
import { EnumProps } from '@/components/ProTable/interface'

export type FormField = FormItem[]
export interface FormItem {
  prop: string
  label: string
  isRules?: boolean
  rules?: any[]
  span?: number
  options?: EnumProps[]
  type?: elementType
  disabled?: boolean
  props?: any
  enum?: EnumProps[]
}
export type FormDataType = {
  [key: string]: any
}
export enum DrawerType {
  showData,
  EditData
}
type elementType =
  | 'input'
  | 'input-number'
  | 'select'
  | 'cascader'
  | 'date-picker'
  | 'time-picker'
  | 'time-select'
  | 'switch'
  | 'slider'
  | 'number'
  | 'datetime'
  | 'date'
